function out=auctionB(x,alp,bet,NA,NB,k,lamB)


temp=1-NA*lamB*( (1-k*(1-NA*lamB))/(1-k*x(1)) )^((1-alp)/alp);

if temp>1
    temp=1;
else end

if temp<0
    temp=0;
else end

out=(temp^bet) * (1 - k*(1-x(1)))^(1-bet);

out=-out;